const EventEmitter = require('events')

const myEvent = new EventEmitter()

// 订阅者1
myEvent.on('事件1', (arguments) => {
  console.info('事件1-1 executed', arguments)
})
// 订阅者2
myEvent.on('事件1', (arguments) => {
  console.info('事件1-2 executed', arguments)
})

// 发布者
myEvent.emit('事件1', 'event_1 params')
